<template>
  <div class="app-container">

    <!-- 查询和其他操作 -->
    <div class="filter-container">
      <el-input v-model="listQuery.vipSeries" clearable class="filter-item" style="width: 200px;" placeholder="请输入用户名称" />
      <el-button class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">查找</el-button>
    </div>

    <!-- 查询结果 -->
    <el-table v-loading="listLoading" :data="list" element-loading-text="正在查询中。。。" border fit highlight-current-row>
      <el-table-column align="center" width="100px" label="ID" prop="id" sortable />
      <el-table-column align="center" label="用户名" prop="userName" />
      <el-table-column align="center" label="连续签到天数" prop="signCount" />
      <el-table-column align="center" label="已签到天数" prop="signDays" />
      <el-table-column align="center" label="签到历史" prop="signHistory" />
      <el-table-column align="center" label="最后修改时间" prop="lastModificationTime" />
      <el-table-column align="center" label="总积分" prop="imtrgration" />

    </el-table>

    <!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> -->
  </div>
</template>

<script>
import { signAll } from '@/api/user'
// import Pagination from '@/components/Pagination' // Secondary package based on el-pagination

export default {
  name: 'User',
  // components: { Pagination },
  data() {
    return {
      list: null,
      total: 0,
      listLoading: true,
      listQuery: {
        page: 0,
        limit: 20,
        username: undefined,
        mobile: undefined,
        userId: undefined,
        sort: 'add_time',
        order: 'desc'
      }
    }
  },
  created() {
    this.getList()
  },
  methods: {
    getList() {
      this.sign = false
      signAll().then(response => {
        console.log(response)
        this.list = response.data
        this.listLoading = false
        console.log(this.list)
      })
    }/* ,
    handleFilter() {
      this.listQuery.page = 1
      this.getList()
    } */
  }
}
</script>
